/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.WebIDE.ejb.sessions;

import java.util.List;
import javax.ejb.Remote;
import javax.persistence.EntityManager;
import org.WebIDE.ejb.entities.Replies;
import org.WebIDE.ejb.entities.Topics;
import org.WebIDE.ejb.sessions.exceptions.*;

/**
 *
 * @author huy
 */
@Remote
public interface TopicsFacadeRemote {

    public void edit(Topics topics) throws NonexistentEntityException, RollbackFailureException, Exception;

    public void create(Topics topics) throws PreexistingEntityException, RollbackFailureException, Exception;

    void remove(Topics topics);

    Topics find(Object id);

    List<Topics> findAll();
    public int getTopicsCount();

    public EntityManager getEntityManager();

    public Topics findTopics(Integer id);

    public List<Topics> findTopicsEntities(int maxResults, int firstResult);

    public List<Topics> findTopicsEntities();

    public void destroy(Integer id) throws NonexistentEntityException, RollbackFailureException, Exception;
    
    int getMaxID();
    
    List<Replies> getReplies(int topicID);
}
